//exam_1_6.c: input a,b,c three integers,find the max value.
#include <stdio.h>

int max_v(int a, int b, int c)
{
    int max_val = 0;
    if(a > b)
    {
        max_val = a;
    }
    else
    {
        max_val = b;
    }
    if(max_val > c)
    {
        return max_val;
    }
    else
    {
        return c;
    }

    return -1;
}
int main(void)
{
    int a,b,c;
    int max_val = 0;
    printf("Enter three numbers:\n");
    scanf("%d%d%d",&a,&b,&c);
    printf("a = %d, b = %d, c = %d\n", a, b, c);
    max_val = max_v(a, b, c);
    printf("max value form a,b,c is : %d\n",max_val);
    return 0;
}
